/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.hazard.supervise.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.common.core.util.DateUtils;
import com.hopes.bizz.hazard.common.constant.enums.HazardSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 企业分类监管
 *
 * @author daijie
 * @date 2024-01-29 14:42:21
 */
@Data
@TableName("haz_classify_supervise")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "企业分类监管")
public class HazClassifySuperviseEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;

	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 总得分
	*/
    @Schema(description="总得分")
    private Integer score;

	/**
	* 风险等级
	*/
    @Schema(description="风险等级")
    private String riskLevel;

	/**
	* 监管类别
	*/
    @Schema(description="监管类别")
    private String superviseType;

	/**
	* 评价人
	*/
    @Schema(description="评价人")
    private Long evaluateUserId;

	/**
	* 评价日期
	*/
    @Schema(description="评价日期")
    private Date evaluateDate;

	/**
	* 复评日期
	*/
    @Schema(description="复评日期")
    private Date reevaluateDate;

	/**
	* 状态
	*/
    @Schema(description="状态")
    private String status;

	/**
	* 附件
	*/
    @Schema(description="附件")
    private String files;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	public String getStatusStr() {
		return DictResolver.getItemLabelByValue(HazardSysDictEnum.hazard_classify_supervise_status, this.getStatus());
	}

	public String getRiskLevelStr() {
		return DictResolver.getItemLabelByValue(HazardSysDictEnum.hazard_classify_supervise_risk_level, this.getRiskLevel());
	}

	public String getSuperviseTypeStr() {
		return DictResolver.getItemLabelByValue(HazardSysDictEnum.hazard_classify_supervise_type, this.getSuperviseType());
	}

	public String getEvaluateDateStr() {
		return DateUtils.limitDay(this.evaluateDate);
	}

	public String getReevaluateDateStr() {
		return DateUtils.limitDay(this.reevaluateDate);
	}

	public String getOrgIdStr() {
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}

	public String getEvaluateUserIdStr() {
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, String.valueOf(this.getEvaluateUserId()));
	}
}